package com.ruoyi.business.controller.app;

import com.ruoyi.business.service.IWsdNotificationsService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.entity.WsdNotifications;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * 存储通知的基本信息 小程序
 * 
 * @author ruoyi
 * @date 2024-04-19
 */
@RestController
@RequestMapping("/wx_notifications")
public class WxAppWsdNotificationsController extends BaseController {

    @Autowired
    private IWsdNotificationsService wsdNotificationsService;

    /**
     * 查询存储通知的基本信息列表
     */
    @GetMapping("/list")
    public TableDataInfo list(WsdNotifications wsdNotifications) {
        startPage();
        List<WsdNotifications> list = wsdNotificationsService.selectWsdNotificationsList(wsdNotifications);
        return getDataTable(list);
    }

    /**
     * 获取存储通知的基本信息详细信息
     */
    @GetMapping(value = "/{notificationsId}")
    public AjaxResult getInfo(@PathVariable("notificationsId") Long notificationsId) {
        return success(wsdNotificationsService.selectWsdNotificationsByNotificationsId(notificationsId));
    }
}
